<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
  
    <h:outputStylesheet library="css" name="default.css"/>
    <f:view contentType="text/html">
        <h:head>
            <f:facet name="first">
                <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
                <title>ProjectManager</title>
            </f:facet>
        </h:head>

        <h:body>
            <h:form id="principal_form">
                <p:layout fullPage="true">

                    <p:layoutUnit position="north" size="90" resizable="false" closable="true" collapsible="true">
                       
                    </p:layoutUnit>

                    <p:layoutUnit position="south" size="90" closable="false" collapsible="true">
                      
                    </p:layoutUnit>

                    <p:layoutUnit position="center" id="capa" >
                         <h:form id="frmContent">
                             #{CtrlPaginas.cargarVacio()}
                             <p:panel id="pnlContent" rendered="true" styleClass="intro_panel"  >
                           
                             <p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
                             <h:panelGrid columns="2" columnClasses="alinder,alinizq" id="grid"  >
                    
                            <p:outputLabel value="Perfil" for="usr000" styleClass="optionalLbl"/>
                            <p:selectOneMenu value="#{ctrEntorno.tipo}" id="usr000">
                                 <f:selectItem itemLabel="Administrador" itemValue="R" />
                                 <f:selectItem itemLabel="Coordinador" itemValue="C"  />
                                 <f:selectItem itemLabel="Director" itemValue="D" />
                                 <f:selectItem itemLabel="Alumno" itemValue="A" />
                                 <p:ajax update="usr004" event="change"/>
                             </p:selectOneMenu>
                            
                            <p:outputLabel value="Carrera" for="usr004" styleClass="optionalLbl"/>
                            <p:selectOneMenu value="#{ctrEntorno.carrera}" id="usr004"   disabled="#{ctrEntorno.tipo eq 'C'||ctrEntorno.tipo eq 'R' }"  label="Carrera" converter="carreraConverter">
                                <f:selectItems value="#{ctrCarreras.vlista}" var="carrera" 
                                 itemLabel="#{carrera.cnombre}" itemValue="#{carrera}" />
                            </p:selectOneMenu>

                                     
                            <p:outputLabel value="Ususario" for="usr001" styleClass="optionalLbl"/>
                            <p:inputText value="#{ctrEntorno.usuario}" label="usuario" id="usr001" size="20" required="true" >
                                <f:validateLength maximum="20" />
                            </p:inputText>

                            <p:outputLabel value="Password" for="usr002" styleClass="optionalLbl" />
                            <p:password value="#{ctrEntorno.password}"  label="password" id="usr002" size="20" >
                                <f:validateLength maximum="20" />
                            </p:password>

                            <h:panelGroup/><h:panelGroup/>
                            <h:panelGroup/><h:panelGroup/>
                            <h:panelGroup/><h:panelGroup/>
                            <h:panelGroup/><h:panelGroup/>
                            <h:panelGroup/><h:panelGroup/>
                            <p:commandButton value="Validar"  action="#{ctrEntorno.validate()}" />
                            <p:commandButton value="Borrar"  type="reset" />
                        </h:panelGrid>
           
                        </p:panel>   
                      </h:form>
                    </p:layoutUnit>
                </p:layout>
            </h:form>
        </h:body>
    </f:view>
</html>

